<?php slot('title', "我的测评 - 五行测评") ?>
<div id="people" class="wrap clearfix">
  <div class="column span-150">
    <ul class="toolbar">
      <li>
        <a href="<?php echo url_for('@center') ?>">会员中心首页</a>
      </li>
      <li>
        <a href="<?php echo url_for('@my_test') ?>">我的测评</a>
      </li>
      <li class="current">
        <a href="<?php echo url_for('@point_log') ?>">我的余额</a>
      </li>
      <li>
        <a href="<?php echo url_for('@invitation_link') ?>">邀请好友</a>
      </li>
      <li>
        <a href="<?php echo url_for('@password') ?>">修改密码</a>
      </li>
    </ul>
  </div>
  <div class="column span-740 last">
    <h3>我的余额</h3>
    <?php use_helper('Date') ?>
    <p class="tips">
      我的余额：<?php echo $sf_user->getPoint() ?>元
      <a style="margin-left: 15px;" href="<?php echo url_for('@addfund') ?>">&gt;支付宝充值</a>
    </p>
    <table class="data-show">
      <thead>
        <tr>
          <th width="220">明细</th>
          <th width="90">类型</th>
          <th width="140">时间</th>
          <th width="80">金额</th>
          <th width="70">状态</th>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($logs as $i=>$log): ?>
        <tr<?php ($i++ % 2 === 0) and print ' class="odd"' ?>>
          <th><?php echo $log['type_sz'] ?></th>
          <td>金币</td>
          <td><?php echo format_date($log['created_at'], 'yyyy-MM-dd hh:mm')?></td>
          <td><?php $log['action'] == PointLog::ACTION_GAIN and print '+' ?><?php echo $log['point'] ?></td>
          <td>
		  <?php if($log['status']==0&&$log['type']==2){ ?>
		  <a href="<?php echo url_for('@funded?id='.$log['id'])?>" target="_black"><?php echo "付款"; ?></a>
		  <?php }else{ ?>
		  已处理
		  <?php }?>
		  </td>
        </tr>
        <?php endforeach ?>
      </tbody>
    </table>
  </div>
</div>